<script type="text/javascript">
function insertSmiley(val)
{
	document.getElementById('preview').src = '<?=$this->baseUrl()?>/static/gfx/smilies/'+val;
	document.getElementById('image').value = val;
}
</script>

<h1><?=$this->translate->_('smiley_header_add')?></h1>

<p><?=$this->translate->_('smiley_select')?>
	<select onchange="insertSmiley(this.value)">
		<option value="#"><?=$this->translate->_('form_choose')?></option>
		<?foreach($this->smilies AS $smiley):?>
			<option value="<?=$smiley?>"><?=$smiley?></option>
		<?endforeach;?>
	</select> 
	<img src="" id="preview" />
</p>

<br />
<?=$this->form?>